The online racing simulator
Searching in All forums
(951 results)
Pitboard V2.17
Yisc[NL]
S3 licensed
For closed tracks you don't have to set the number of splits.
The Pitboard reads the trackname and then has the number of splits in its code.
For open configs you do need to set the number of splits, otherwise the Pitboard won't know how many splits to display.

Ah, I think I know what the issue is Smile
The latest version I uploaded here (2.13) doesn't work with recent versions of Lapper.
So on my end I am running version 2.16 Beta (for just over 3 years, so I guess it should move into a release now, otherwise I will never happen Big grin)

Here we go with version 2.17

Changelog Pitboard V2.17

-Removed some debug code
-Removed a WHILE-loop from sub 'OnRaceStart_Pitboard' and replaced it with a FOREACH-loop
-Removed a WHILE-loop from sub 'OnQualStart_Pitboard' and replaced it with a FOREACH-loop
-Called the wrong array ('$ply_list' instead of '$ply_list_tmp') in Sub 'OnRaceStart_Pitboard'
-Called the wrong array ('$ply_list' instead of '$ply_list_tmp') in Sub 'OnQualStart_Pitboard'
-Looped through wrong array ('$ply_list_pb_racestart' instead of '$ply_list_pb_qualstart') in Sub 'OnQualStart_Pitboard'
-Used a wrong variable ('$uName' instead of '$uName_pitboard') in the FOREACH-loops

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
I made a registration system for Lapper.
See this: https://www.lfs.net/forum/post/1927566#post1927566
Yisc[NL]
S3 licensed
In the past I made the toptable script, which displays the best time for each car on that track (see screenshot below). Would that be useful as a start for this wish: Time table for best laps done total, car filter to click

Yisc[NL]
S3 licensed
Wow, that is a serious request for help with many wishes. I read it a few times but cannot see the big picture so far, so let me start with a question. Why isn't Lapper not able to record laps that are longer then 10 minutes? Have to admit that I never had to deal with such long laps, but Lapper takes the start of a lap, then takes splits and in the end a total laptime. So I cannot see why it would not allow laps that are above a certain value.
Yisc[NL]
S3 licensed
Thanks for all your efforts and if this is your last one, I hope that someone wants to step up and keep this program being developed.
Yisc[NL]
S3 licensed
No, the delayed command will run when the timer expires, whether the last player finished his lap or not. That's why I said that you need to set the timer to the duration of the qualification and add a couple of minutes to take that very last lap into account (within a reasonable time). You will know the world record for the track+car(s) (take the slowest car when you have multiple ones) and then add like 10% (of course this is just an example and you need to work out those numbers to your situation).
Yisc[NL]
S3 licensed
And you want the countdown to start when the last player finished qualification?
Then you might have to do something with a delayed command that gets started when qualify start.
Let us say that qualify is 10 minutes, so at the start of the qualify you run a delayed command that does something after those 10 minutes.
This might be useful for what you want:

HostDelayedCommand - Set a delayed command on the host rather than a player

Delayed commands are set by seconds, so you could set it at 10 x 60 = 600 seconds and then take into account that a player can finish his lap when qualify time runs out. So maybe at 2 minutes to that delayed account.

I have not really tried the above suggestion, just doing this mostly from memory.
Yisc[NL]
S3 licensed
You need this event to do that:

OnFinish : trigered when a player finish a race or qualification
Yisc[NL]
S3 licensed
You cannot do that with Lapper code, unless you also kept a list of all registered player names in Lapper.
But, you could download DB Browser (SQLite) and run a query to retrieve and change the values.
Yisc[NL]
S3 licensed
I understand the security concerns, but LFS players won't see Lapper executing the HTTP command, so they have no knowlegde to what URL it is sending data. From the other side no data can been seen, when someone would get hold of the URL, as PHP is executed server-side and only displays the outcome on a website (if there is anything to display), so unless someone gets the actual PHP-file, this is pretty safe.
Yisc[NL]
S3 licensed
It's Lapper throwing the error on the HTTP command or when PHP gives information back to Lapper?

It could be because of https (that's a guess) or maybe you need to put the value between single quotes, like this:

http("https://velocitymsports.com/testscript.php?uname='Bass-Driver'");
Yisc[NL]
S3 licensed
Ah, that must have happened at some point then.
As you know I still am on a rather old version of Lapper and that HTTP function is working like a dream there.

You can make the webpage talk back to Lapper, using Lapper commands and make them by echoed by PHP.
As long as the syntax is right for Lapper, it will do what you want it to do.
Yisc[NL]
S3 licensed
I never see my HTTP commands on the console, so that's probably because you have it in a ![cmd] event.
Could you try to go to a SUB from the ![cmd] and put the HTTP command in the SUB?
Yisc[NL]
S3 licensed
I think this can never work:

$uName = http("http://localhost/testscript.php?uname=".$userName);

You put an URL into a variable, while you want to execute the HTTP command.
Try this:


<?php 
CASE "!http":
   
http("http://localhost/testscript.php/?uname=".$userName);
   
globalmsg("Hello: ".$userName);
 BREAK;
?>

Yisc[NL]
S3 licensed
I see you have an error in your http syntax:

This: $uName = http("http://localhost/testscript.php/?uname=".$userName);

Should be: $uName = http("http://localhost/testscript.php?uname=".$userName);
Yisc[NL]
S3 licensed
My PHP script looks like this:


<?php 
### Get data send through LFS Lapper ###
$servername$_GET['servername'];
$race_date$_GET['date'];
$password$_GET['password'];
### End ###

Follow by code to do certain things.
?>

In my Lapper Sub I have this:

http("http://[URL TO WEBSERVER]/test_pwd_lfs.php?servername=".$server_name_schedule."&date=".$date_storage."&password=".$pwd_storage);

I think you cannot run PHP-pages on your local computer, they always have to be on a webserver.
Points system V1.06b
Yisc[NL]
S3 licensed
Changelog Points system V1.06b

-The GlobalButton for fastest lap was still showing a value of 15 instead of 5, corrected that
-Removed ToNum from fastest lap function, as it was causing errors in the Lapper log

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Quote from Bass-Driver :Thx Yisc for the quick fix.

Going to disable that script in the next update.
To avoid the confusion.

As far as I know, that issue is no longer there in the current versions of Lapper.
Like I said, Rack Service uses a very old version of Lapper and that has that script and it's causing trouble.
Yisc[NL]
S3 licensed
Yes, seen it and solved it Smile

Your server hosted at Rack Services I guess.
For an unknown reason they are offering a very old Lapper version (6.0.12) that has the exact issue you described.

Luckily I recently found the solution after a fellow Frenchmen asked about it here at the forum.
Open 'addonsused.lpr' and then changed this line: include( "./guiconfig.lpr");

To: #include( "./guiconfig.lpr");

Save the file and restart Lapper and the problem will be gone.
Points system V1.06
Yisc[NL]
S3 licensed
Changelog Points system V1.06

-Changed points awarded to driver with fastest lap from 15 to 5

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Is the track wrong or should people just learn that you cannot win a race in the first corner, but only lose it?
I strongly believe in the second option.
Yisc[NL]
S3 licensed
Quote from Draggo :I think he talking about this https://www.lfs.net/forum/thread/28815-ISRM-mod-drag-0-5-Beta---Release

If that's the case, it isn't a Lapper script and then I will close this thread.
There is a Lapper version of that as well, see this: https://www.lfs.net/forum/thread/89909-Drag-system
Yisc[NL]
S3 licensed
Why not run it on the latest version of LFS to start with?
Then, if you want help with a script, it might be a good idea to attach the script, as we can then have a look at it and help you.
Now we have to guess what is going on, which is a waste of time Smile
LFS Lapper: Multiple penalties
Yisc[NL]
S3 licensed
As promised, by view on how to do multiple penalties:

1) Add the code below to the OnLap event. When a driver completes a lap, Lapper will see if that player hasn't got an active penalty (PenaltyNew == 0) AND if PlayerVar 'reset_abuse' is set to "true". If so, give the player a 45 sec penalty


Event OnLap( $userName ) # Player event
IF ( GetCurrentPlayerVar ( "PenaltyNew" ) == 0 && GetCurrentPlayerVar ( "reset_abuse" ) == "true" )
THEN
cmdLFS( "/p_45 " . $userName );
ENDIF
EndEvent

2) Add the code below to the OnRaceStart event. This is to clear PlayerVar 'reset_abuse' for every player that starts the race (in case there are multiple races)


Event OnRaceStart( $NumP ) # Lapper event
$mList = GetListOfPlayers("N");
$mCount = arrayCount( $mList );
$plyNum=0;
$players_on_track=0;

WHILE ($plyNum < $mCount)
$uName = $mList[$plyNum];
SetPlayerVar( $uName,"reset_abuse","" );
$plyNum=$plyNum+1;
ENDWHILE
EndEvent

3) When applying ResetPenalty, set PlayerVar 'reset_abuse' to "true"


Sub ApplyCarResetPenalty( $userName )
IF( GetCurrentPlayerVar( "LapsDone" ) > 0 )
THEN
IF( getLapperVar( "RaceLapsLeft" ) <= 1 )
THEN
cmdLFS( "/p_30 " . GetCurrentPlayerVar( "UserName" ) );
ELSE
cmdLFS( "/p_sg " . GetCurrentPlayerVar( "UserName" ) );
SetCurrentPlayerVar ( "reset_abuse","true" );
ENDIF
ENDIF
EndSub

Yisc[NL]
S3 licensed
I think that writing in capitals on an online platform is considered as shouting and therefor rude behavior.
I also think that it would be better to write a well written first post when starting a thread.
As in, describe carefully what it is you want to hear from others and what your own opinion is to start with.

The thread is about a comparison between Asetto Corsa and LFS.
FGED GREDG RDFGDR GSFDG